package com.glureau.aib.server.equipe;

import java.util.List;

import com.glureau.aib.client.equipe.PionService;
import com.glureau.aib.server.db.mysql.DB_Pion;
import com.glureau.aib.shared.equipe.PionInfo;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class PionServiceImpl extends RemoteServiceServlet implements PionService {

	@Override
	public List<PionInfo> getPionInfos(String sessionId) {
		return new DB_Pion().getPions(sessionId);
	}

	@Override
	public void savePion(String sessionId, PionInfo pionInfo) {
		new DB_Pion().savePion(sessionId, pionInfo);
	}

	@Override
	public PionInfo getPionInfo(String sessionId, int numero) {
		return new DB_Pion().getPion(sessionId, numero);
	}

}
